<?php

// 创建一个udp 的服务

$http = new swoole_http_server('0.0.0.0',8811);


$http->set(
	[
		'enable_static_handler' => true,
        'document_root' => "/home/wwwroot/swoole/host",
	]
);


/** */

$http->on('request',function($request, $response){	
	print_r($request->get);	
	$response->cookie('fwz','fengzi',time()+1800);  // 设置cookie
	$response->end("ssss".json_encode($request->get));
});


$http->start();
